home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / devel-docs / libgimp / sgml / gimpimage.sgml < prev    next >
Encoding:
Text File  |  2003-05-20  |  83.7 KB  |  1,816 lines

  1. <refentry id="libgimp-gimpimage" revision="19 Jan 2001">
  2. <refmeta>
  3. <refentrytitle>gimpimage</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. <refmiscinfo>LIBGIMP Library</refmiscinfo>
  6. </refmeta>
  7.  
  8. <refnamediv>
  9. <refname>gimpimage</refname><refpurpose></refpurpose>
  10. </refnamediv>
  11.  
  12. <refsynopsisdiv><title>Synopsis</title>
  13. <synopsis>
  14.  
  15.  
  16.  
  17. <link linkend="gint">gint</link>*       <link linkend="gimp-image-list">gimp_image_list</link>                 (<link linkend="gint">gint</link> *num_images);
  18. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-new">gimp_image_new</link>                  (<link linkend="gint">gint</link> width,
  19.                                              <link linkend="gint">gint</link> height,
  20.                                              <link linkend="GimpImageBaseType">GimpImageBaseType</link> type);
  21. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-resize">gimp_image_resize</link>               (<link linkend="gint32">gint32</link> image_ID,
  22.                                              <link linkend="gint">gint</link> new_width,
  23.                                              <link linkend="gint">gint</link> new_height,
  24.                                              <link linkend="gint">gint</link> offx,
  25.                                              <link linkend="gint">gint</link> offy);
  26. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-scale">gimp_image_scale</link>                (<link linkend="gint32">gint32</link> image_ID,
  27.                                              <link linkend="gint">gint</link> new_width,
  28.                                              <link linkend="gint">gint</link> new_height);
  29. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-delete">gimp_image_delete</link>               (<link linkend="gint32">gint32</link> image_ID);
  30. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-free-shadow">gimp_image_free_shadow</link>          (<link linkend="gint32">gint32</link> image_ID);
  31. <link linkend="gint">gint</link>*       <link linkend="gimp-image-get-layers">gimp_image_get_layers</link>           (<link linkend="gint32">gint32</link> image_ID,
  32.                                              <link linkend="gint">gint</link> *num_layers);
  33. <link linkend="gint">gint</link>*       <link linkend="gimp-image-get-channels">gimp_image_get_channels</link>         (<link linkend="gint32">gint32</link> image_ID,
  34.                                              <link linkend="gint">gint</link> *num_channels);
  35. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-unset-active-channel">gimp_image_unset_active_channel</link> (<link linkend="gint32">gint32</link> image_ID);
  36. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-pick-correlate-layer">gimp_image_pick_correlate_layer</link> (<link linkend="gint32">gint32</link> image_ID,
  37.                                              <link linkend="gint">gint</link> x,
  38.                                              <link linkend="gint">gint</link> y);
  39. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-raise-layer">gimp_image_raise_layer</link>          (<link linkend="gint32">gint32</link> image_ID,
  40.                                              <link linkend="gint32">gint32</link> layer_ID);
  41. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-lower-layer">gimp_image_lower_layer</link>          (<link linkend="gint32">gint32</link> image_ID,
  42.                                              <link linkend="gint32">gint32</link> layer_ID);
  43. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-raise-layer-to-top">gimp_image_raise_layer_to_top</link>   (<link linkend="gint32">gint32</link> image_ID,
  44.                                              <link linkend="gint32">gint32</link> layer_ID);
  45. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-lower-layer-to-bottom">gimp_image_lower_layer_to_bottom</link>
  46.                                             (<link linkend="gint32">gint32</link> image_ID,
  47.                                              <link linkend="gint32">gint32</link> layer_ID);
  48. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-merge-visible-layers">gimp_image_merge_visible_layers</link> (<link linkend="gint32">gint32</link> image_ID,
  49.                                              <link linkend="GimpMergeType">GimpMergeType</link> merge_type);
  50. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-merge-down">gimp_image_merge_down</link>           (<link linkend="gint32">gint32</link> image_ID,
  51.                                              <link linkend="gint32">gint32</link> merge_layer_ID,
  52.                                              <link linkend="GimpMergeType">GimpMergeType</link> merge_type);
  53. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-flatten">gimp_image_flatten</link>              (<link linkend="gint32">gint32</link> image_ID);
  54. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-add-layer">gimp_image_add_layer</link>            (<link linkend="gint32">gint32</link> image_ID,
  55.                                              <link linkend="gint32">gint32</link> layer_ID,
  56.                                              <link linkend="gint">gint</link> position);
  57. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-remove-layer">gimp_image_remove_layer</link>         (<link linkend="gint32">gint32</link> image_ID,
  58.                                              <link linkend="gint32">gint32</link> layer_ID);
  59. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-add-layer-mask">gimp_image_add_layer_mask</link>       (<link linkend="gint32">gint32</link> image_ID,
  60.                                              <link linkend="gint32">gint32</link> layer_ID,
  61.                                              <link linkend="gint32">gint32</link> mask_ID);
  62. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-remove-layer-mask">gimp_image_remove_layer_mask</link>    (<link linkend="gint32">gint32</link> image_ID,
  63.                                              <link linkend="gint32">gint32</link> layer_ID,
  64.                                              <link linkend="GimpMaskApplyMode">GimpMaskApplyMode</link> mode);
  65. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-raise-channel">gimp_image_raise_channel</link>        (<link linkend="gint32">gint32</link> image_ID,
  66.                                              <link linkend="gint32">gint32</link> channel_ID);
  67. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-lower-channel">gimp_image_lower_channel</link>        (<link linkend="gint32">gint32</link> image_ID,
  68.                                              <link linkend="gint32">gint32</link> layer_ID);
  69. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-add-channel">gimp_image_add_channel</link>          (<link linkend="gint32">gint32</link> image_ID,
  70.                                              <link linkend="gint32">gint32</link> channel_ID,
  71.                                              <link linkend="gint">gint</link> position);
  72. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-remove-channel">gimp_image_remove_channel</link>       (<link linkend="gint32">gint32</link> image_ID,
  73.                                              <link linkend="gint32">gint32</link> channel_ID);
  74. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-active-drawable">gimp_image_active_drawable</link>      (<link linkend="gint32">gint32</link> image_ID);
  75. <link linkend="GimpImageBaseType">GimpImageBaseType</link> <link linkend="gimp-image-base-type">gimp_image_base_type</link>      (<link linkend="gint32">gint32</link> image_ID);
  76. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-undo-is-enabled">gimp_image_undo_is_enabled</link>      (<link linkend="gint32">gint32</link> image_ID);
  77. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-undo-enable">gimp_image_undo_enable</link>          (<link linkend="gint32">gint32</link> image_ID);
  78. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-undo-disable">gimp_image_undo_disable</link>         (<link linkend="gint32">gint32</link> image_ID);
  79. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-undo-freeze">gimp_image_undo_freeze</link>          (<link linkend="gint32">gint32</link> image_ID);
  80. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-undo-thaw">gimp_image_undo_thaw</link>            (<link linkend="gint32">gint32</link> image_ID);
  81. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-clean-all">gimp_image_clean_all</link>            (<link linkend="gint32">gint32</link> image_ID);
  82. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-floating-selection">gimp_image_floating_selection</link>   (<link linkend="gint32">gint32</link> image_ID);
  83. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-floating-sel-attached-to">gimp_image_floating_sel_attached_to</link>
  84.                                             (<link linkend="gint32">gint32</link> image_ID);
  85. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-tattoo-state">gimp_image_set_tattoo_state</link>     (<link linkend="gint32">gint32</link> image_ID,
  86.                                              <link linkend="gint">gint</link> tattoo);
  87. <link linkend="gint">gint</link>        <link linkend="gimp-image-get-tattoo-state">gimp_image_get_tattoo_state</link>     (<link linkend="gint32">gint32</link> image_ID);
  88. <link linkend="gint">gint</link>        <link linkend="gimp-image-width">gimp_image_width</link>                (<link linkend="gint32">gint32</link> image_ID);
  89. <link linkend="gint">gint</link>        <link linkend="gimp-image-height">gimp_image_height</link>               (<link linkend="gint32">gint32</link> image_ID);
  90. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-active-layer">gimp_image_get_active_layer</link>     (<link linkend="gint32">gint32</link> image_ID);
  91. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-active-layer">gimp_image_set_active_layer</link>     (<link linkend="gint32">gint32</link> image_ID,
  92.                                              <link linkend="gint32">gint32</link> active_layer_ID);
  93. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-active-channel">gimp_image_get_active_channel</link>   (<link linkend="gint32">gint32</link> image_ID);
  94. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-active-channel">gimp_image_set_active_channel</link>   (<link linkend="gint32">gint32</link> image_ID,
  95.                                              <link linkend="gint32">gint32</link> active_channel_ID);
  96. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-selection">gimp_image_get_selection</link>        (<link linkend="gint32">gint32</link> image_ID);
  97. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-get-component-active">gimp_image_get_component_active</link> (<link linkend="gint32">gint32</link> image_ID,
  98.                                              <link linkend="GimpChannelType">GimpChannelType</link> component);
  99. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-component-active">gimp_image_set_component_active</link> (<link linkend="gint32">gint32</link> image_ID,
  100.                                              <link linkend="GimpChannelType">GimpChannelType</link> component,
  101.                                              <link linkend="gboolean">gboolean</link> active);
  102. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-get-component-visible">gimp_image_get_component_visible</link>
  103.                                             (<link linkend="gint32">gint32</link> image_ID,
  104.                                              <link linkend="GimpChannelType">GimpChannelType</link> component);
  105. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-component-visible">gimp_image_set_component_visible</link>
  106.                                             (<link linkend="gint32">gint32</link> image_ID,
  107.                                              <link linkend="GimpChannelType">GimpChannelType</link> component,
  108.                                              <link linkend="gboolean">gboolean</link> visible);
  109. <link linkend="gchar">gchar</link>*      <link linkend="gimp-image-get-filename">gimp_image_get_filename</link>         (<link linkend="gint32">gint32</link> image_ID);
  110. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-filename">gimp_image_set_filename</link>         (<link linkend="gint32">gint32</link> image_ID,
  111.                                              <link linkend="gchar">gchar</link> *filename);
  112. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-get-resolution">gimp_image_get_resolution</link>       (<link linkend="gint32">gint32</link> image_ID,
  113.                                              <link linkend="gdouble">gdouble</link> *xresolution,
  114.                                              <link linkend="gdouble">gdouble</link> *yresolution);
  115. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-resolution">gimp_image_set_resolution</link>       (<link linkend="gint32">gint32</link> image_ID,
  116.                                              <link linkend="gdouble">gdouble</link> xresolution,
  117.                                              <link linkend="gdouble">gdouble</link> yresolution);
  118. <link linkend="GimpUnit">GimpUnit</link>    <link linkend="gimp-image-get-unit">gimp_image_get_unit</link>             (<link linkend="gint32">gint32</link> image_ID);
  119. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-unit">gimp_image_set_unit</link>             (<link linkend="gint32">gint32</link> image_ID,
  120.                                              <link linkend="GimpUnit">GimpUnit</link> unit);
  121. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-layer-by-tattoo">gimp_image_get_layer_by_tattoo</link>  (<link linkend="gint32">gint32</link> image_ID,
  122.                                              <link linkend="gint">gint</link> tattoo);
  123. <link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-channel-by-tattoo">gimp_image_get_channel_by_tattoo</link>
  124.                                             (<link linkend="gint32">gint32</link> image_ID,
  125.                                              <link linkend="gint">gint</link> tattoo);
  126. <link linkend="guchar">guchar</link>*     <link linkend="gimp-image-get-cmap">gimp_image_get_cmap</link>             (<link linkend="gint32">gint32</link> image_ID,
  127.                                              <link linkend="gint">gint</link> *num_colors);
  128. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-cmap">gimp_image_set_cmap</link>             (<link linkend="gint32">gint32</link> image_ID,
  129.                                              <link linkend="guchar">guchar</link> *cmap,
  130.                                              <link linkend="gint">gint</link> num_colors);
  131. <link linkend="guchar">guchar</link>*     <link linkend="gimp-image-get-thumbnail-data">gimp_image_get_thumbnail_data</link>   (<link linkend="gint32">gint32</link> image_ID,
  132.                                              <link linkend="gint">gint</link> *width,
  133.                                              <link linkend="gint">gint</link> *height,
  134.                                              <link linkend="gint">gint</link> *bpp);
  135. #define     <link linkend="gimp-image-convert-rgb">gimp_image_convert_rgb</link>
  136. #define     <link linkend="gimp-image-convert-grayscale">gimp_image_convert_grayscale</link>
  137. #define     <link linkend="gimp-image-convert-indexed">gimp_image_convert_indexed</link>
  138. #define     <link linkend="gimp-image-duplicate">gimp_image_duplicate</link>
  139. </synopsis>
  140. </refsynopsisdiv>
  141.  
  142.  
  143.  
  144.  
  145.  
  146. <refsect1>
  147. <title>Description</title>
  148. <para>
  149.  
  150. </para>
  151. </refsect1>
  152.  
  153. <refsect1>
  154. <title>Details</title>
  155. <refsect2>
  156. <title><anchor id="gimp-image-list">gimp_image_list ()</title>
  157. <programlisting><link linkend="gint">gint</link>*       gimp_image_list                 (<link linkend="gint">gint</link> *num_images);</programlisting>
  158. <para>
  159. Returns the list of images currently open.
  160. </para>
  161. <para>
  162. This procedure returns the list of images currently open in the
  163. GIMP.</para>
  164. <para>
  165.  
  166. </para><informaltable pgwide=1 frame="none" role="params">
  167. <tgroup cols="2">
  168. <colspec colwidth="2*">
  169. <colspec colwidth="8*">
  170. <tbody>
  171. <row><entry align="right"><parameter>num_images</parameter> :</entry>
  172. <entry> The number of images currently open.
  173. </entry></row>
  174. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The list of images currently open.
  175. </entry></row>
  176. </tbody></tgroup></informaltable></refsect2>
  177. <refsect2>
  178. <title><anchor id="gimp-image-new">gimp_image_new ()</title>
  179. <programlisting><link linkend="gint32">gint32</link>      gimp_image_new                  (<link linkend="gint">gint</link> width,
  180.                                              <link linkend="gint">gint</link> height,
  181.                                              <link linkend="GimpImageBaseType">GimpImageBaseType</link> type);</programlisting>
  182. <para>
  183. Creates a new image with the specified width, height, and type.
  184. </para>
  185. <para>
  186. Creates a new image, undisplayed with the specified extents and
  187. type. A layer should be created and added before this image is
  188. displayed, or subsequent calls to 'gimp_display_new' with this image
  189. as an argument will fail. Layers can be created using the
  190. 'gimp_layer_new' commands. They can be added to an image using the
  191. 'gimp_image_add_layer' command.</para>
  192. <para>
  193.  
  194. </para><informaltable pgwide=1 frame="none" role="params">
  195. <tgroup cols="2">
  196. <colspec colwidth="2*">
  197. <colspec colwidth="8*">
  198. <tbody>
  199. <row><entry align="right"><parameter>width</parameter> :</entry>
  200. <entry> The width of the image.
  201. </entry></row>
  202. <row><entry align="right"><parameter>height</parameter> :</entry>
  203. <entry> The height of the image.
  204. </entry></row>
  205. <row><entry align="right"><parameter>type</parameter> :</entry>
  206. <entry> The type of image.
  207. </entry></row>
  208. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The ID of the newly created image.
  209. </entry></row>
  210. </tbody></tgroup></informaltable></refsect2>
  211. <refsect2>
  212. <title><anchor id="gimp-image-resize">gimp_image_resize ()</title>
  213. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_resize               (<link linkend="gint32">gint32</link> image_ID,
  214.                                              <link linkend="gint">gint</link> new_width,
  215.                                              <link linkend="gint">gint</link> new_height,
  216.                                              <link linkend="gint">gint</link> offx,
  217.                                              <link linkend="gint">gint</link> offy);</programlisting>
  218. <para>
  219. Resize the image to the specified extents.
  220. </para>
  221. <para>
  222. This procedure resizes the image so that it's new width and height
  223. are equal to the supplied parameters. Offsets are also provided
  224. which describe the position of the previous image's content. No
  225. bounds checking is currently provided, so don't supply parameters
  226. that are out of bounds. All channels within the image are resized
  227. according to the specified parameters; this includes the image
  228. selection mask. All layers within the image are repositioned
  229. according to the specified offsets.</para>
  230. <para>
  231.  
  232. </para><informaltable pgwide=1 frame="none" role="params">
  233. <tgroup cols="2">
  234. <colspec colwidth="2*">
  235. <colspec colwidth="8*">
  236. <tbody>
  237. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  238. <entry> The image.
  239. </entry></row>
  240. <row><entry align="right"><parameter>new_width</parameter> :</entry>
  241. <entry> New image width.
  242. </entry></row>
  243. <row><entry align="right"><parameter>new_height</parameter> :</entry>
  244. <entry> New image height.
  245. </entry></row>
  246. <row><entry align="right"><parameter>offx</parameter> :</entry>
  247. <entry> x offset between upper left corner of old and new images: (new - old).
  248. </entry></row>
  249. <row><entry align="right"><parameter>offy</parameter> :</entry>
  250. <entry> y offset between upper left corner of old and new images: (new - old).
  251. </entry></row>
  252. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  253. </entry></row>
  254. </tbody></tgroup></informaltable></refsect2>
  255. <refsect2>
  256. <title><anchor id="gimp-image-scale">gimp_image_scale ()</title>
  257. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_scale                (<link linkend="gint32">gint32</link> image_ID,
  258.                                              <link linkend="gint">gint</link> new_width,
  259.                                              <link linkend="gint">gint</link> new_height);</programlisting>
  260. <para>
  261. Scale the image to the specified extents.
  262. </para>
  263. <para>
  264. This procedure scales the image so that it's new width and height
  265. are equal to the supplied parameters. Offsets are also provided
  266. which describe the position of the previous image's content. No
  267. bounds checking is currently provided, so don't supply parameters
  268. that are out of bounds. All channels within the image are scaled
  269. according to the specified parameters; this includes the image
  270. selection mask. All layers within the image are repositioned
  271. according to the specified offsets.</para>
  272. <para>
  273.  
  274. </para><informaltable pgwide=1 frame="none" role="params">
  275. <tgroup cols="2">
  276. <colspec colwidth="2*">
  277. <colspec colwidth="8*">
  278. <tbody>
  279. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  280. <entry> The image.
  281. </entry></row>
  282. <row><entry align="right"><parameter>new_width</parameter> :</entry>
  283. <entry> New image width.
  284. </entry></row>
  285. <row><entry align="right"><parameter>new_height</parameter> :</entry>
  286. <entry> New image height.
  287. </entry></row>
  288. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  289. </entry></row>
  290. </tbody></tgroup></informaltable></refsect2>
  291. <refsect2>
  292. <title><anchor id="gimp-image-delete">gimp_image_delete ()</title>
  293. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_delete               (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  294. <para>
  295. Delete the specified image.
  296. </para>
  297. <para>
  298. If there are no displays associated with this image it will be
  299. deleted. This means that you can not delete an image through the PDB
  300. that was created by the user. If the associated display was however
  301. created through the PDB and you know the display ID, you may delete
  302. the display. Removal of the last associated display will then delete
  303. the image.</para>
  304. <para>
  305.  
  306. </para><informaltable pgwide=1 frame="none" role="params">
  307. <tgroup cols="2">
  308. <colspec colwidth="2*">
  309. <colspec colwidth="8*">
  310. <tbody>
  311. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  312. <entry> The image.
  313. </entry></row>
  314. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  315. </entry></row>
  316. </tbody></tgroup></informaltable></refsect2>
  317. <refsect2>
  318. <title><anchor id="gimp-image-free-shadow">gimp_image_free_shadow ()</title>
  319. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_free_shadow          (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  320. <para>
  321. Free the specified image's shadow data (if it exists).
  322. </para>
  323. <para>
  324. This procedure is intended as a memory saving device. If any shadow
  325. memory has been allocated, it will be freed automatically on a call
  326. to 'gimp_image_delete'.</para>
  327. <para>
  328.  
  329. </para><informaltable pgwide=1 frame="none" role="params">
  330. <tgroup cols="2">
  331. <colspec colwidth="2*">
  332. <colspec colwidth="8*">
  333. <tbody>
  334. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  335. <entry> The image.
  336. </entry></row>
  337. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  338. </entry></row>
  339. </tbody></tgroup></informaltable></refsect2>
  340. <refsect2>
  341. <title><anchor id="gimp-image-get-layers">gimp_image_get_layers ()</title>
  342. <programlisting><link linkend="gint">gint</link>*       gimp_image_get_layers           (<link linkend="gint32">gint32</link> image_ID,
  343.                                              <link linkend="gint">gint</link> *num_layers);</programlisting>
  344. <para>
  345. Returns the list of layers contained in the specified image.
  346. </para>
  347. <para>
  348. This procedure returns the list of layers contained in the specified
  349. image. The order of layers is from topmost to bottommost.</para>
  350. <para>
  351.  
  352. </para><informaltable pgwide=1 frame="none" role="params">
  353. <tgroup cols="2">
  354. <colspec colwidth="2*">
  355. <colspec colwidth="8*">
  356. <tbody>
  357. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  358. <entry> The image.
  359. </entry></row>
  360. <row><entry align="right"><parameter>num_layers</parameter> :</entry>
  361. <entry> The number of layers contained in the image.
  362. </entry></row>
  363. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The list of layers contained in the image.
  364. </entry></row>
  365. </tbody></tgroup></informaltable></refsect2>
  366. <refsect2>
  367. <title><anchor id="gimp-image-get-channels">gimp_image_get_channels ()</title>
  368. <programlisting><link linkend="gint">gint</link>*       gimp_image_get_channels         (<link linkend="gint32">gint32</link> image_ID,
  369.                                              <link linkend="gint">gint</link> *num_channels);</programlisting>
  370. <para>
  371. Returns the list of channels contained in the specified image.
  372. </para>
  373. <para>
  374. This procedure returns the list of channels contained in the
  375. specified image. This does not include the selection mask, or layer
  376. masks. The order is from topmost to bottommost.</para>
  377. <para>
  378.  
  379. </para><informaltable pgwide=1 frame="none" role="params">
  380. <tgroup cols="2">
  381. <colspec colwidth="2*">
  382. <colspec colwidth="8*">
  383. <tbody>
  384. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  385. <entry> The image.
  386. </entry></row>
  387. <row><entry align="right"><parameter>num_channels</parameter> :</entry>
  388. <entry> The number of channels contained in the image.
  389. </entry></row>
  390. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The list of channels contained in the image.
  391. </entry></row>
  392. </tbody></tgroup></informaltable></refsect2>
  393. <refsect2>
  394. <title><anchor id="gimp-image-unset-active-channel">gimp_image_unset_active_channel ()</title>
  395. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_unset_active_channel (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  396. <para>
  397. Unsets the active channel in the specified image.
  398. </para>
  399. <para>
  400. If an active channel exists, it is unset. There then exists no
  401. active channel, and if desired, one can be set through a call to
  402. 'Set Active Channel'. No error is returned in the case of no
  403. existing active channel.</para>
  404. <para>
  405.  
  406. </para><informaltable pgwide=1 frame="none" role="params">
  407. <tgroup cols="2">
  408. <colspec colwidth="2*">
  409. <colspec colwidth="8*">
  410. <tbody>
  411. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  412. <entry> The image.
  413. </entry></row>
  414. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  415. </entry></row>
  416. </tbody></tgroup></informaltable></refsect2>
  417. <refsect2>
  418. <title><anchor id="gimp-image-pick-correlate-layer">gimp_image_pick_correlate_layer ()</title>
  419. <programlisting><link linkend="gint32">gint32</link>      gimp_image_pick_correlate_layer (<link linkend="gint32">gint32</link> image_ID,
  420.                                              <link linkend="gint">gint</link> x,
  421.                                              <link linkend="gint">gint</link> y);</programlisting>
  422. <para>
  423. Find the layer visible at the specified coordinates.
  424. </para>
  425. <para>
  426. This procedure finds the layer which is visible at the specified
  427. coordinates. Layers which do not qualify are those whose extents do
  428. not pass within the specified coordinates, or which are transparent
  429. at the specified coordinates. This procedure will return -1 if no
  430. layer is found.</para>
  431. <para>
  432.  
  433. </para><informaltable pgwide=1 frame="none" role="params">
  434. <tgroup cols="2">
  435. <colspec colwidth="2*">
  436. <colspec colwidth="8*">
  437. <tbody>
  438. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  439. <entry> The image.
  440. </entry></row>
  441. <row><entry align="right"><parameter>x</parameter> :</entry>
  442. <entry> The x coordinate for the pick.
  443. </entry></row>
  444. <row><entry align="right"><parameter>y</parameter> :</entry>
  445. <entry> The y coordinate for the pick.
  446. </entry></row>
  447. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The layer found at the specified coordinates.
  448. </entry></row>
  449. </tbody></tgroup></informaltable></refsect2>
  450. <refsect2>
  451. <title><anchor id="gimp-image-raise-layer">gimp_image_raise_layer ()</title>
  452. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_raise_layer          (<link linkend="gint32">gint32</link> image_ID,
  453.                                              <link linkend="gint32">gint32</link> layer_ID);</programlisting>
  454. <para>
  455. Raise the specified layer in the image's layer stack
  456. </para>
  457. <para>
  458. This procedure raises the specified layer one step in the existing
  459. layer stack. It will not move the layer if there is no layer above
  460. it, or the layer has no alpha channel.</para>
  461. <para>
  462.  
  463. </para><informaltable pgwide=1 frame="none" role="params">
  464. <tgroup cols="2">
  465. <colspec colwidth="2*">
  466. <colspec colwidth="8*">
  467. <tbody>
  468. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  469. <entry> The image.
  470. </entry></row>
  471. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  472. <entry> The layer to raise.
  473. </entry></row>
  474. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  475. </entry></row>
  476. </tbody></tgroup></informaltable></refsect2>
  477. <refsect2>
  478. <title><anchor id="gimp-image-lower-layer">gimp_image_lower_layer ()</title>
  479. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_lower_layer          (<link linkend="gint32">gint32</link> image_ID,
  480.                                              <link linkend="gint32">gint32</link> layer_ID);</programlisting>
  481. <para>
  482. Lower the specified layer in the image's layer stack
  483. </para>
  484. <para>
  485. This procedure lowers the specified layer one step in the existing
  486. layer stack. It will not move the layer if there is no layer below
  487. it, or the layer has no alpha channel.</para>
  488. <para>
  489.  
  490. </para><informaltable pgwide=1 frame="none" role="params">
  491. <tgroup cols="2">
  492. <colspec colwidth="2*">
  493. <colspec colwidth="8*">
  494. <tbody>
  495. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  496. <entry> The image.
  497. </entry></row>
  498. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  499. <entry> The layer to lower.
  500. </entry></row>
  501. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  502. </entry></row>
  503. </tbody></tgroup></informaltable></refsect2>
  504. <refsect2>
  505. <title><anchor id="gimp-image-raise-layer-to-top">gimp_image_raise_layer_to_top ()</title>
  506. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_raise_layer_to_top   (<link linkend="gint32">gint32</link> image_ID,
  507.                                              <link linkend="gint32">gint32</link> layer_ID);</programlisting>
  508. <para>
  509. Raise the specified layer in the image's layer stack to top of stack
  510. </para>
  511. <para>
  512. This procedure raises the specified layer to top of the existing
  513. layer stack. It will not move the layer if there is no layer above
  514. it, or the layer has no alpha channel.</para>
  515. <para>
  516.  
  517. </para><informaltable pgwide=1 frame="none" role="params">
  518. <tgroup cols="2">
  519. <colspec colwidth="2*">
  520. <colspec colwidth="8*">
  521. <tbody>
  522. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  523. <entry> The image.
  524. </entry></row>
  525. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  526. <entry> The layer to raise to top.
  527. </entry></row>
  528. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  529. </entry></row>
  530. </tbody></tgroup></informaltable></refsect2>
  531. <refsect2>
  532. <title><anchor id="gimp-image-lower-layer-to-bottom">gimp_image_lower_layer_to_bottom ()</title>
  533. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_lower_layer_to_bottom
  534.                                             (<link linkend="gint32">gint32</link> image_ID,
  535.                                              <link linkend="gint32">gint32</link> layer_ID);</programlisting>
  536. <para>
  537. Lower the specified layer in the image's layer stack to bottom of
  538. stack
  539. </para>
  540. <para>
  541. This procedure lowers the specified layer to bottom of the existing
  542. layer stack. It will not move the layer if there is no layer below
  543. it, or the layer has no alpha channel.</para>
  544. <para>
  545.  
  546. </para><informaltable pgwide=1 frame="none" role="params">
  547. <tgroup cols="2">
  548. <colspec colwidth="2*">
  549. <colspec colwidth="8*">
  550. <tbody>
  551. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  552. <entry> The image.
  553. </entry></row>
  554. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  555. <entry> The layer to lower to bottom.
  556. </entry></row>
  557. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  558. </entry></row>
  559. </tbody></tgroup></informaltable></refsect2>
  560. <refsect2>
  561. <title><anchor id="gimp-image-merge-visible-layers">gimp_image_merge_visible_layers ()</title>
  562. <programlisting><link linkend="gint32">gint32</link>      gimp_image_merge_visible_layers (<link linkend="gint32">gint32</link> image_ID,
  563.                                              <link linkend="GimpMergeType">GimpMergeType</link> merge_type);</programlisting>
  564. <para>
  565. Merge the visible image layers into one.
  566. </para>
  567. <para>
  568. This procedure combines the visible layers into a single layer using
  569. the specified merge type. A merge type of EXPAND_AS_NECESSARY
  570. expands the final layer to encompass the areas of the visible
  571. layers. A merge type of CLIP_TO_IMAGE clips the final layer to the
  572. extents of the image. A merge type of CLIP_TO_BOTTOM_LAYER clips the
  573. final layer to the size of the bottommost layer.</para>
  574. <para>
  575.  
  576. </para><informaltable pgwide=1 frame="none" role="params">
  577. <tgroup cols="2">
  578. <colspec colwidth="2*">
  579. <colspec colwidth="8*">
  580. <tbody>
  581. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  582. <entry> The image.
  583. </entry></row>
  584. <row><entry align="right"><parameter>merge_type</parameter> :</entry>
  585. <entry> The type of merge.
  586. </entry></row>
  587. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The resulting layer.
  588. </entry></row>
  589. </tbody></tgroup></informaltable></refsect2>
  590. <refsect2>
  591. <title><anchor id="gimp-image-merge-down">gimp_image_merge_down ()</title>
  592. <programlisting><link linkend="gint32">gint32</link>      gimp_image_merge_down           (<link linkend="gint32">gint32</link> image_ID,
  593.                                              <link linkend="gint32">gint32</link> merge_layer_ID,
  594.                                              <link linkend="GimpMergeType">GimpMergeType</link> merge_type);</programlisting>
  595. <para>
  596. Merge the layer passed and the first visible layer below.
  597. </para>
  598. <para>
  599. This procedure combines the passed layer and the first visible layer
  600. below it using the specified merge type. A merge type of
  601. EXPAND_AS_NECESSARY expands the final layer to encompass the areas
  602. of the visible layers. A merge type of CLIP_TO_IMAGE clips the final
  603. layer to the extents of the image. A merge type of
  604. CLIP_TO_BOTTOM_LAYER clips the final layer to the size of the
  605. bottommost layer.</para>
  606. <para>
  607.  
  608. </para><informaltable pgwide=1 frame="none" role="params">
  609. <tgroup cols="2">
  610. <colspec colwidth="2*">
  611. <colspec colwidth="8*">
  612. <tbody>
  613. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  614. <entry> The image.
  615. </entry></row>
  616. <row><entry align="right"><parameter>merge_layer_ID</parameter> :</entry>
  617. <entry> The layer to merge down from.
  618. </entry></row>
  619. <row><entry align="right"><parameter>merge_type</parameter> :</entry>
  620. <entry> The type of merge.
  621. </entry></row>
  622. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The resulting layer.
  623. </entry></row>
  624. </tbody></tgroup></informaltable></refsect2>
  625. <refsect2>
  626. <title><anchor id="gimp-image-flatten">gimp_image_flatten ()</title>
  627. <programlisting><link linkend="gint32">gint32</link>      gimp_image_flatten              (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  628. <para>
  629. Flatten all visible layers into a single layer. Discard all
  630. invisible layers.
  631. </para>
  632. <para>
  633. This procedure combines the visible layers in a manner analogous to
  634. merging with the CLIP_TO_IMAGE merge type. Non-visible layers are
  635. discarded, and the resulting image is stripped of its alpha channel.</para>
  636. <para>
  637.  
  638. </para><informaltable pgwide=1 frame="none" role="params">
  639. <tgroup cols="2">
  640. <colspec colwidth="2*">
  641. <colspec colwidth="8*">
  642. <tbody>
  643. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  644. <entry> The image.
  645. </entry></row>
  646. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The resulting layer.
  647. </entry></row>
  648. </tbody></tgroup></informaltable></refsect2>
  649. <refsect2>
  650. <title><anchor id="gimp-image-add-layer">gimp_image_add_layer ()</title>
  651. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_add_layer            (<link linkend="gint32">gint32</link> image_ID,
  652.                                              <link linkend="gint32">gint32</link> layer_ID,
  653.                                              <link linkend="gint">gint</link> position);</programlisting>
  654. <para>
  655. Add the specified layer to the image.
  656. </para>
  657. <para>
  658. This procedure adds the specified layer to the gimage at the given
  659. position. If the position is specified as -1, then the layer is
  660. inserted at the top of the layer stack. If the layer to be added has
  661. no alpha channel, it must be added at position 0. The layer type
  662. must be compatible with the image base type.</para>
  663. <para>
  664.  
  665. </para><informaltable pgwide=1 frame="none" role="params">
  666. <tgroup cols="2">
  667. <colspec colwidth="2*">
  668. <colspec colwidth="8*">
  669. <tbody>
  670. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  671. <entry> The image.
  672. </entry></row>
  673. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  674. <entry> The layer.
  675. </entry></row>
  676. <row><entry align="right"><parameter>position</parameter> :</entry>
  677. <entry> The layer position.
  678. </entry></row>
  679. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  680. </entry></row>
  681. </tbody></tgroup></informaltable></refsect2>
  682. <refsect2>
  683. <title><anchor id="gimp-image-remove-layer">gimp_image_remove_layer ()</title>
  684. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_remove_layer         (<link linkend="gint32">gint32</link> image_ID,
  685.                                              <link linkend="gint32">gint32</link> layer_ID);</programlisting>
  686. <para>
  687. Remove the specified layer from the image.
  688. </para>
  689. <para>
  690. This procedure removes the specified layer from the image. If the
  691. layer doesn't exist, an error is returned. If there are no layers
  692. left in the image, this call will fail. If this layer is the last
  693. layer remaining, the image will become empty and have no active
  694. layer.</para>
  695. <para>
  696.  
  697. </para><informaltable pgwide=1 frame="none" role="params">
  698. <tgroup cols="2">
  699. <colspec colwidth="2*">
  700. <colspec colwidth="8*">
  701. <tbody>
  702. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  703. <entry> The image.
  704. </entry></row>
  705. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  706. <entry> The layer.
  707. </entry></row>
  708. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  709. </entry></row>
  710. </tbody></tgroup></informaltable></refsect2>
  711. <refsect2>
  712. <title><anchor id="gimp-image-add-layer-mask">gimp_image_add_layer_mask ()</title>
  713. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_add_layer_mask       (<link linkend="gint32">gint32</link> image_ID,
  714.                                              <link linkend="gint32">gint32</link> layer_ID,
  715.                                              <link linkend="gint32">gint32</link> mask_ID);</programlisting>
  716. <para>
  717. Add a layer mask to the specified layer.
  718. </para>
  719. <para>
  720. This procedure adds a layer mask to the specified layer. Layer masks
  721. serve as an additional alpha channel for a layer. This procedure
  722. will fail if a number of prerequisites aren't met. The layer cannot
  723. already have a layer mask. The specified mask must exist and have
  724. the same dimensions as the layer. Both the mask and the layer must
  725. have been created for use with the specified image.</para>
  726. <para>
  727.  
  728. </para><informaltable pgwide=1 frame="none" role="params">
  729. <tgroup cols="2">
  730. <colspec colwidth="2*">
  731. <colspec colwidth="8*">
  732. <tbody>
  733. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  734. <entry> The image.
  735. </entry></row>
  736. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  737. <entry> The layer to receive the mask.
  738. </entry></row>
  739. <row><entry align="right"><parameter>mask_ID</parameter> :</entry>
  740. <entry> The mask to add to the layer.
  741. </entry></row>
  742. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  743. </entry></row>
  744. </tbody></tgroup></informaltable></refsect2>
  745. <refsect2>
  746. <title><anchor id="gimp-image-remove-layer-mask">gimp_image_remove_layer_mask ()</title>
  747. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_remove_layer_mask    (<link linkend="gint32">gint32</link> image_ID,
  748.                                              <link linkend="gint32">gint32</link> layer_ID,
  749.                                              <link linkend="GimpMaskApplyMode">GimpMaskApplyMode</link> mode);</programlisting>
  750. <para>
  751. Remove the specified layer mask from the layer.
  752. </para>
  753. <para>
  754. This procedure removes the specified layer mask from the layer. If
  755. the mask doesn't exist, an error is returned.</para>
  756. <para>
  757.  
  758. </para><informaltable pgwide=1 frame="none" role="params">
  759. <tgroup cols="2">
  760. <colspec colwidth="2*">
  761. <colspec colwidth="8*">
  762. <tbody>
  763. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  764. <entry> The image.
  765. </entry></row>
  766. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  767. <entry> The layer from which to remove mask.
  768. </entry></row>
  769. <row><entry align="right"><parameter>mode</parameter> :</entry>
  770. <entry> Removal mode.
  771. </entry></row>
  772. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  773. </entry></row>
  774. </tbody></tgroup></informaltable></refsect2>
  775. <refsect2>
  776. <title><anchor id="gimp-image-raise-channel">gimp_image_raise_channel ()</title>
  777. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_raise_channel        (<link linkend="gint32">gint32</link> image_ID,
  778.                                              <link linkend="gint32">gint32</link> channel_ID);</programlisting>
  779. <para>
  780. Raise the specified channel in the image's channel stack
  781. </para>
  782. <para>
  783. This procedure raises the specified channel one step in the existing
  784. channel stack. It will not move the channel if there is no channel
  785. above it.</para>
  786. <para>
  787.  
  788. </para><informaltable pgwide=1 frame="none" role="params">
  789. <tgroup cols="2">
  790. <colspec colwidth="2*">
  791. <colspec colwidth="8*">
  792. <tbody>
  793. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  794. <entry> The image.
  795. </entry></row>
  796. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  797. <entry> The channel to raise.
  798. </entry></row>
  799. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  800. </entry></row>
  801. </tbody></tgroup></informaltable></refsect2>
  802. <refsect2>
  803. <title><anchor id="gimp-image-lower-channel">gimp_image_lower_channel ()</title>
  804. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_lower_channel        (<link linkend="gint32">gint32</link> image_ID,
  805.                                              <link linkend="gint32">gint32</link> layer_ID);</programlisting>
  806. <para>
  807. Lower the specified layer in the image's layer stack
  808. </para>
  809. <para>
  810. This procedure lowers the specified layer one step in the existing
  811. layer stack. It will not move the layer if there is no layer below
  812. it, or the layer has no alpha channel.</para>
  813. <para>
  814.  
  815. </para><informaltable pgwide=1 frame="none" role="params">
  816. <tgroup cols="2">
  817. <colspec colwidth="2*">
  818. <colspec colwidth="8*">
  819. <tbody>
  820. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  821. <entry> The image.
  822. </entry></row>
  823. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  824. <entry> The layer to lower.
  825. </entry></row>
  826. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  827. </entry></row>
  828. </tbody></tgroup></informaltable></refsect2>
  829. <refsect2>
  830. <title><anchor id="gimp-image-add-channel">gimp_image_add_channel ()</title>
  831. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_add_channel          (<link linkend="gint32">gint32</link> image_ID,
  832.                                              <link linkend="gint32">gint32</link> channel_ID,
  833.                                              <link linkend="gint">gint</link> position);</programlisting>
  834. <para>
  835. Add the specified channel to the image.
  836. </para>
  837. <para>
  838. This procedure adds the specified channel to the image. The position
  839. channel is not currently used, so the channel is always inserted at
  840. the top of the channel stack.</para>
  841. <para>
  842.  
  843. </para><informaltable pgwide=1 frame="none" role="params">
  844. <tgroup cols="2">
  845. <colspec colwidth="2*">
  846. <colspec colwidth="8*">
  847. <tbody>
  848. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  849. <entry> The image.
  850. </entry></row>
  851. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  852. <entry> The channel.
  853. </entry></row>
  854. <row><entry align="right"><parameter>position</parameter> :</entry>
  855. <entry> The channel position.
  856. </entry></row>
  857. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  858. </entry></row>
  859. </tbody></tgroup></informaltable></refsect2>
  860. <refsect2>
  861. <title><anchor id="gimp-image-remove-channel">gimp_image_remove_channel ()</title>
  862. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_remove_channel       (<link linkend="gint32">gint32</link> image_ID,
  863.                                              <link linkend="gint32">gint32</link> channel_ID);</programlisting>
  864. <para>
  865. Remove the specified channel from the image.
  866. </para>
  867. <para>
  868. This procedure removes the specified channel from the image. If the
  869. channel doesn't exist, an error is returned.</para>
  870. <para>
  871.  
  872. </para><informaltable pgwide=1 frame="none" role="params">
  873. <tgroup cols="2">
  874. <colspec colwidth="2*">
  875. <colspec colwidth="8*">
  876. <tbody>
  877. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  878. <entry> The image.
  879. </entry></row>
  880. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  881. <entry> The channel.
  882. </entry></row>
  883. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  884. </entry></row>
  885. </tbody></tgroup></informaltable></refsect2>
  886. <refsect2>
  887. <title><anchor id="gimp-image-active-drawable">gimp_image_active_drawable ()</title>
  888. <programlisting><link linkend="gint32">gint32</link>      gimp_image_active_drawable      (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  889. <para>
  890. Get the image's active drawable
  891. </para>
  892. <para>
  893. This procedure returns the ID of the image's active drawable. This
  894. can be either a layer, a channel, or a layer mask. The active
  895. drawable is specified by the active image channel. If that is -1,
  896. then by the active image layer. If the active image layer has a
  897. layer mask and the layer mask is in edit mode, then the layer mask
  898. is the active drawable.</para>
  899. <para>
  900.  
  901. </para><informaltable pgwide=1 frame="none" role="params">
  902. <tgroup cols="2">
  903. <colspec colwidth="2*">
  904. <colspec colwidth="8*">
  905. <tbody>
  906. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  907. <entry> The image.
  908. </entry></row>
  909. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The active drawable.
  910. </entry></row>
  911. </tbody></tgroup></informaltable></refsect2>
  912. <refsect2>
  913. <title><anchor id="gimp-image-base-type">gimp_image_base_type ()</title>
  914. <programlisting><link linkend="GimpImageBaseType">GimpImageBaseType</link> gimp_image_base_type      (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  915. <para>
  916. Get the base type of the image.
  917. </para>
  918. <para>
  919. This procedure returns the image's base type. Layers in the image
  920. must be of this subtype, but can have an optional alpha channel.</para>
  921. <para>
  922.  
  923. </para><informaltable pgwide=1 frame="none" role="params">
  924. <tgroup cols="2">
  925. <colspec colwidth="2*">
  926. <colspec colwidth="8*">
  927. <tbody>
  928. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  929. <entry> The image.
  930. </entry></row>
  931. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The image's base type.
  932. </entry></row>
  933. </tbody></tgroup></informaltable></refsect2>
  934. <refsect2>
  935. <title><anchor id="gimp-image-undo-is-enabled">gimp_image_undo_is_enabled ()</title>
  936. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_undo_is_enabled      (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  937. <para>
  938. Check if the image's undo stack is enabled.
  939. </para>
  940. <para>
  941. This procedure checks if the image's undo stack is currently enabled
  942. or disabled. This is useful when several plugins or scripts call
  943. each other and want to check if their caller has already used
  944. 'gimp_image_undo_disable' or 'gimp_image_undo_freeze'.</para>
  945. <para>
  946.  
  947. </para><informaltable pgwide=1 frame="none" role="params">
  948. <tgroup cols="2">
  949. <colspec colwidth="2*">
  950. <colspec colwidth="8*">
  951. <tbody>
  952. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  953. <entry> The image.
  954. </entry></row>
  955. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> True if undo is enabled for this image.
  956. </entry></row>
  957. </tbody></tgroup></informaltable></refsect2>
  958. <refsect2>
  959. <title><anchor id="gimp-image-undo-enable">gimp_image_undo_enable ()</title>
  960. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_undo_enable          (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  961. <para>
  962. Enable the image's undo stack.
  963. </para>
  964. <para>
  965. This procedure enables the image's undo stack, allowing subsequent
  966. operations to store their undo steps. This is generally called in
  967. conjunction with 'gimp_image_undo_disable' to temporarily disable an
  968. image undo stack.</para>
  969. <para>
  970.  
  971. </para><informaltable pgwide=1 frame="none" role="params">
  972. <tgroup cols="2">
  973. <colspec colwidth="2*">
  974. <colspec colwidth="8*">
  975. <tbody>
  976. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  977. <entry> The image.
  978. </entry></row>
  979. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> True if the image undo has been enabled.
  980. </entry></row>
  981. </tbody></tgroup></informaltable></refsect2>
  982. <refsect2>
  983. <title><anchor id="gimp-image-undo-disable">gimp_image_undo_disable ()</title>
  984. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_undo_disable         (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  985. <para>
  986. Disable the image's undo stack.
  987. </para>
  988. <para>
  989. This procedure disables the image's undo stack, allowing subsequent
  990. operations to ignore their undo steps. This is generally called in
  991. conjunction with 'gimp_image_undo_enable' to temporarily disable an
  992. image undo stack. This is advantageous because saving undo steps can
  993. be time and memory intensive.</para>
  994. <para>
  995.  
  996. </para><informaltable pgwide=1 frame="none" role="params">
  997. <tgroup cols="2">
  998. <colspec colwidth="2*">
  999. <colspec colwidth="8*">
  1000. <tbody>
  1001. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1002. <entry> The image.
  1003. </entry></row>
  1004. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> True if the image undo has been disabled.
  1005. </entry></row>
  1006. </tbody></tgroup></informaltable></refsect2>
  1007. <refsect2>
  1008. <title><anchor id="gimp-image-undo-freeze">gimp_image_undo_freeze ()</title>
  1009. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_undo_freeze          (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1010. <para>
  1011. Freeze the image's undo stack.
  1012. </para>
  1013. <para>
  1014. This procedure freezes the image's undo stack, allowing subsequent
  1015. operations to ignore their undo steps. This is generally called in
  1016. conjunction with 'gimp_image_undo_thaw' to temporarily disable an
  1017. image undo stack. This is advantageous because saving undo steps can
  1018. be time and memory intensive. 'gimp_image_undo_{freeze,thaw}' and
  1019. 'gimp_image_undo_{disable,enable}' differ in that the former does
  1020. not free up all undo steps when undo is thawed, so is more suited to
  1021. interactive in-situ previews. It is important in this case that the
  1022. image is back to the same state it was frozen in before thawing,
  1023. else 'undo' behaviour is undefined.</para>
  1024. <para>
  1025.  
  1026. </para><informaltable pgwide=1 frame="none" role="params">
  1027. <tgroup cols="2">
  1028. <colspec colwidth="2*">
  1029. <colspec colwidth="8*">
  1030. <tbody>
  1031. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1032. <entry> The image.
  1033. </entry></row>
  1034. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> True if the image undo has been frozen.
  1035. </entry></row>
  1036. </tbody></tgroup></informaltable></refsect2>
  1037. <refsect2>
  1038. <title><anchor id="gimp-image-undo-thaw">gimp_image_undo_thaw ()</title>
  1039. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_undo_thaw            (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1040. <para>
  1041. Thaw the image's undo stack.
  1042. </para>
  1043. <para>
  1044. This procedure thaws the image's undo stack, allowing subsequent
  1045. operations to store their undo steps. This is generally called in
  1046. conjunction with 'gimp_image_undo_freeze' to temporarily freeze an
  1047. image undo stack. 'gimp_image_undo_thaw' does NOT free the undo
  1048. stack as 'gimp_image_undo_enable' does, so is suited for situations
  1049. where one wishes to leave the undo stack in the same state in which
  1050. one found it despite non-destructively playing with the image in the
  1051. meantime. An example would be in-situ plugin previews. Balancing
  1052. freezes and thaws and ensuring image consistancy is the
  1053. responsibility of the caller.</para>
  1054. <para>
  1055.  
  1056. </para><informaltable pgwide=1 frame="none" role="params">
  1057. <tgroup cols="2">
  1058. <colspec colwidth="2*">
  1059. <colspec colwidth="8*">
  1060. <tbody>
  1061. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1062. <entry> The image.
  1063. </entry></row>
  1064. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> True if the image undo has been thawed.
  1065. </entry></row>
  1066. </tbody></tgroup></informaltable></refsect2>
  1067. <refsect2>
  1068. <title><anchor id="gimp-image-clean-all">gimp_image_clean_all ()</title>
  1069. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_clean_all            (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1070. <para>
  1071. Set the image dirty count to 0.
  1072. </para>
  1073. <para>
  1074. This procedure sets the specified image's dirty count to 0, allowing
  1075. operations to occur without having a 'dirtied' image. This is
  1076. especially useful for creating and loading images which should not
  1077. initially be considered dirty, even though layers must be created,
  1078. filled, and installed in the image.</para>
  1079. <para>
  1080.  
  1081. </para><informaltable pgwide=1 frame="none" role="params">
  1082. <tgroup cols="2">
  1083. <colspec colwidth="2*">
  1084. <colspec colwidth="8*">
  1085. <tbody>
  1086. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1087. <entry> The image.
  1088. </entry></row>
  1089. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1090. </entry></row>
  1091. </tbody></tgroup></informaltable></refsect2>
  1092. <refsect2>
  1093. <title><anchor id="gimp-image-floating-selection">gimp_image_floating_selection ()</title>
  1094. <programlisting><link linkend="gint32">gint32</link>      gimp_image_floating_selection   (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1095. <para>
  1096. Return the floating selection of the image.
  1097. </para>
  1098. <para>
  1099. This procedure returns the image's floating_sel, if it exists. If it
  1100. doesn't exist, -1 is returned as the layer ID.</para>
  1101. <para>
  1102.  
  1103. </para><informaltable pgwide=1 frame="none" role="params">
  1104. <tgroup cols="2">
  1105. <colspec colwidth="2*">
  1106. <colspec colwidth="8*">
  1107. <tbody>
  1108. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1109. <entry> The image.
  1110. </entry></row>
  1111. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The image's floating selection.
  1112. </entry></row>
  1113. </tbody></tgroup></informaltable></refsect2>
  1114. <refsect2>
  1115. <title><anchor id="gimp-image-floating-sel-attached-to">gimp_image_floating_sel_attached_to ()</title>
  1116. <programlisting><link linkend="gint32">gint32</link>      gimp_image_floating_sel_attached_to
  1117.                                             (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1118. <para>
  1119. Return the drawable the floating selection is attached to.
  1120. </para>
  1121. <para>
  1122. This procedure returns the drawable the image's floating selection
  1123. is attached to, if it exists. If it doesn't exist, -1 is returned as
  1124. the drawable ID.</para>
  1125. <para>
  1126.  
  1127. </para><informaltable pgwide=1 frame="none" role="params">
  1128. <tgroup cols="2">
  1129. <colspec colwidth="2*">
  1130. <colspec colwidth="8*">
  1131. <tbody>
  1132. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1133. <entry> The image.
  1134. </entry></row>
  1135. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The drawable the floating selection is attached to.
  1136. </entry></row>
  1137. </tbody></tgroup></informaltable></refsect2>
  1138. <refsect2>
  1139. <title><anchor id="gimp-image-set-tattoo-state">gimp_image_set_tattoo_state ()</title>
  1140. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_tattoo_state     (<link linkend="gint32">gint32</link> image_ID,
  1141.                                              <link linkend="gint">gint</link> tattoo);</programlisting>
  1142. <para>
  1143. Set the tattoo state associated with the image.
  1144. </para>
  1145. <para>
  1146. This procedure sets the tattoo state of the image. Use only by
  1147. save/load plugins that wish to preserve an images tattoo state.
  1148. Using this function at other times will produce unexpected results.
  1149. A full check of uniqueness of states in layers, channels and paths
  1150. will be performed by this procedure and a execution failure will be
  1151. returned if this fails. A failure will also be returned if the new
  1152. tattoo state value is less than the maximum tattoo value from all of
  1153. the tattoos from the paths,layers and channels. After the image data
  1154. has been loaded and all the tattoos have been set then this is the
  1155. last procedure that should be called. If effectively does a status
  1156. check on the tattoo values that have been set to make sure that all
  1157. is OK.</para>
  1158. <para>
  1159.  
  1160. </para><informaltable pgwide=1 frame="none" role="params">
  1161. <tgroup cols="2">
  1162. <colspec colwidth="2*">
  1163. <colspec colwidth="8*">
  1164. <tbody>
  1165. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1166. <entry> The image.
  1167. </entry></row>
  1168. <row><entry align="right"><parameter>tattoo</parameter> :</entry>
  1169. <entry> The new tattoo state of the image.
  1170. </entry></row>
  1171. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1172. </entry></row>
  1173. </tbody></tgroup></informaltable></refsect2>
  1174. <refsect2>
  1175. <title><anchor id="gimp-image-get-tattoo-state">gimp_image_get_tattoo_state ()</title>
  1176. <programlisting><link linkend="gint">gint</link>        gimp_image_get_tattoo_state     (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1177. <para>
  1178. Returns the tattoo state associated with the image.
  1179. </para>
  1180. <para>
  1181. This procedure returns the tattoo state of the image. Use only by
  1182. save/load plugins that wish to preserve an images tattoo state.
  1183. Using this function at other times will produce unexpected results.</para>
  1184. <para>
  1185.  
  1186. </para><informaltable pgwide=1 frame="none" role="params">
  1187. <tgroup cols="2">
  1188. <colspec colwidth="2*">
  1189. <colspec colwidth="8*">
  1190. <tbody>
  1191. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1192. <entry> The image.
  1193. </entry></row>
  1194. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The tattoo state associated with the image.
  1195. </entry></row>
  1196. </tbody></tgroup></informaltable></refsect2>
  1197. <refsect2>
  1198. <title><anchor id="gimp-image-width">gimp_image_width ()</title>
  1199. <programlisting><link linkend="gint">gint</link>        gimp_image_width                (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1200. <para>
  1201. Return the width of the image
  1202. </para>
  1203. <para>
  1204. This procedure returns the image's width. This value is independent
  1205. of any of the layers in this image. This is the \"canvas\" width.</para>
  1206. <para>
  1207.  
  1208. </para><informaltable pgwide=1 frame="none" role="params">
  1209. <tgroup cols="2">
  1210. <colspec colwidth="2*">
  1211. <colspec colwidth="8*">
  1212. <tbody>
  1213. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1214. <entry> The image.
  1215. </entry></row>
  1216. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The image's width.
  1217. </entry></row>
  1218. </tbody></tgroup></informaltable></refsect2>
  1219. <refsect2>
  1220. <title><anchor id="gimp-image-height">gimp_image_height ()</title>
  1221. <programlisting><link linkend="gint">gint</link>        gimp_image_height               (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1222. <para>
  1223. Return the height of the image
  1224. </para>
  1225. <para>
  1226. This procedure returns the image's width. This value is independent
  1227. of any of the layers in this image. This is the \"canvas\" height.</para>
  1228. <para>
  1229.  
  1230. </para><informaltable pgwide=1 frame="none" role="params">
  1231. <tgroup cols="2">
  1232. <colspec colwidth="2*">
  1233. <colspec colwidth="8*">
  1234. <tbody>
  1235. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1236. <entry> The image.
  1237. </entry></row>
  1238. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The image's height.
  1239. </entry></row>
  1240. </tbody></tgroup></informaltable></refsect2>
  1241. <refsect2>
  1242. <title><anchor id="gimp-image-get-active-layer">gimp_image_get_active_layer ()</title>
  1243. <programlisting><link linkend="gint32">gint32</link>      gimp_image_get_active_layer     (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1244. <para>
  1245. Returns the specified image's active layer.
  1246. </para>
  1247. <para>
  1248. If there is an active layer, its ID will be returned, otherwise, -1.
  1249. If a channel is currently active, then no layer will be. If a layer
  1250. mask is active, then this will return the associated layer.</para>
  1251. <para>
  1252.  
  1253. </para><informaltable pgwide=1 frame="none" role="params">
  1254. <tgroup cols="2">
  1255. <colspec colwidth="2*">
  1256. <colspec colwidth="8*">
  1257. <tbody>
  1258. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1259. <entry> The image.
  1260. </entry></row>
  1261. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The active layer.
  1262. </entry></row>
  1263. </tbody></tgroup></informaltable></refsect2>
  1264. <refsect2>
  1265. <title><anchor id="gimp-image-set-active-layer">gimp_image_set_active_layer ()</title>
  1266. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_active_layer     (<link linkend="gint32">gint32</link> image_ID,
  1267.                                              <link linkend="gint32">gint32</link> active_layer_ID);</programlisting>
  1268. <para>
  1269. Sets the specified image's active layer.
  1270. </para>
  1271. <para>
  1272. If the layer exists, it is set as the active layer in the image. Any
  1273. previous active layer or channel is set to inactive. An exception is
  1274. a previously existing floating selection, in which case this
  1275. procedure will return an execution error.</para>
  1276. <para>
  1277.  
  1278. </para><informaltable pgwide=1 frame="none" role="params">
  1279. <tgroup cols="2">
  1280. <colspec colwidth="2*">
  1281. <colspec colwidth="8*">
  1282. <tbody>
  1283. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1284. <entry> The image.
  1285. </entry></row>
  1286. <row><entry align="right"><parameter>active_layer_ID</parameter> :</entry>
  1287. <entry> The new image active layer.
  1288. </entry></row>
  1289. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1290. </entry></row>
  1291. </tbody></tgroup></informaltable></refsect2>
  1292. <refsect2>
  1293. <title><anchor id="gimp-image-get-active-channel">gimp_image_get_active_channel ()</title>
  1294. <programlisting><link linkend="gint32">gint32</link>      gimp_image_get_active_channel   (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1295. <para>
  1296. Returns the specified image's active channel.
  1297. </para>
  1298. <para>
  1299. If there is an active channel, this will return the channel ID,
  1300. otherwise, -1.</para>
  1301. <para>
  1302.  
  1303. </para><informaltable pgwide=1 frame="none" role="params">
  1304. <tgroup cols="2">
  1305. <colspec colwidth="2*">
  1306. <colspec colwidth="8*">
  1307. <tbody>
  1308. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1309. <entry> The image.
  1310. </entry></row>
  1311. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The active channel.
  1312. </entry></row>
  1313. </tbody></tgroup></informaltable></refsect2>
  1314. <refsect2>
  1315. <title><anchor id="gimp-image-set-active-channel">gimp_image_set_active_channel ()</title>
  1316. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_active_channel   (<link linkend="gint32">gint32</link> image_ID,
  1317.                                              <link linkend="gint32">gint32</link> active_channel_ID);</programlisting>
  1318. <para>
  1319. Sets the specified image's active channel.
  1320. </para>
  1321. <para>
  1322. If the channel exists, it is set as the active channel in the image.
  1323. Any previous active channel or channel is set to inactive. An
  1324. exception is a previously existing floating selection, in which case
  1325. this procedure will return an execution error.</para>
  1326. <para>
  1327.  
  1328. </para><informaltable pgwide=1 frame="none" role="params">
  1329. <tgroup cols="2">
  1330. <colspec colwidth="2*">
  1331. <colspec colwidth="8*">
  1332. <tbody>
  1333. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1334. <entry> The image.
  1335. </entry></row>
  1336. <row><entry align="right"><parameter>active_channel_ID</parameter> :</entry>
  1337. <entry> The new image active channel.
  1338. </entry></row>
  1339. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1340. </entry></row>
  1341. </tbody></tgroup></informaltable></refsect2>
  1342. <refsect2>
  1343. <title><anchor id="gimp-image-get-selection">gimp_image_get_selection ()</title>
  1344. <programlisting><link linkend="gint32">gint32</link>      gimp_image_get_selection        (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1345. <para>
  1346. Returns the specified image's selection.
  1347. </para>
  1348. <para>
  1349. This will always return a valid ID for a selection -- which is
  1350. represented as a channel internally.</para>
  1351. <para>
  1352.  
  1353. </para><informaltable pgwide=1 frame="none" role="params">
  1354. <tgroup cols="2">
  1355. <colspec colwidth="2*">
  1356. <colspec colwidth="8*">
  1357. <tbody>
  1358. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1359. <entry> The image.
  1360. </entry></row>
  1361. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The selection channel.
  1362. </entry></row>
  1363. </tbody></tgroup></informaltable></refsect2>
  1364. <refsect2>
  1365. <title><anchor id="gimp-image-get-component-active">gimp_image_get_component_active ()</title>
  1366. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_get_component_active (<link linkend="gint32">gint32</link> image_ID,
  1367.                                              <link linkend="GimpChannelType">GimpChannelType</link> component);</programlisting>
  1368. <para>
  1369. Returns if the specified image's image component is active.
  1370. </para>
  1371. <para>
  1372. This procedure returns if the specified image's image component
  1373. (i.e. Red, Green, Blue intensity channels in an RGB image) is active
  1374. or inactive -- whether or not it can be modified. If the specified
  1375. component is not valid for the image type, an error is returned.</para>
  1376. <para>
  1377.  
  1378. </para><informaltable pgwide=1 frame="none" role="params">
  1379. <tgroup cols="2">
  1380. <colspec colwidth="2*">
  1381. <colspec colwidth="8*">
  1382. <tbody>
  1383. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1384. <entry> The image.
  1385. </entry></row>
  1386. <row><entry align="right"><parameter>component</parameter> :</entry>
  1387. <entry> The image component.
  1388. </entry></row>
  1389. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Component is active.
  1390. </entry></row>
  1391. </tbody></tgroup></informaltable></refsect2>
  1392. <refsect2>
  1393. <title><anchor id="gimp-image-set-component-active">gimp_image_set_component_active ()</title>
  1394. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_component_active (<link linkend="gint32">gint32</link> image_ID,
  1395.                                              <link linkend="GimpChannelType">GimpChannelType</link> component,
  1396.                                              <link linkend="gboolean">gboolean</link> active);</programlisting>
  1397. <para>
  1398. Sets if the specified image's image component is active.
  1399. </para>
  1400. <para>
  1401. This procedure sets if the specified image's image component (i.e.
  1402. Red, Green, Blue intensity channels in an RGB image) is active or
  1403. inactive -- whether or not it can be modified. If the specified
  1404. component is not valid for the image type, an error is returned.</para>
  1405. <para>
  1406.  
  1407. </para><informaltable pgwide=1 frame="none" role="params">
  1408. <tgroup cols="2">
  1409. <colspec colwidth="2*">
  1410. <colspec colwidth="8*">
  1411. <tbody>
  1412. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1413. <entry> The image.
  1414. </entry></row>
  1415. <row><entry align="right"><parameter>component</parameter> :</entry>
  1416. <entry> The image component.
  1417. </entry></row>
  1418. <row><entry align="right"><parameter>active</parameter> :</entry>
  1419. <entry> Component is active.
  1420. </entry></row>
  1421. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1422. </entry></row>
  1423. </tbody></tgroup></informaltable></refsect2>
  1424. <refsect2>
  1425. <title><anchor id="gimp-image-get-component-visible">gimp_image_get_component_visible ()</title>
  1426. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_get_component_visible
  1427.                                             (<link linkend="gint32">gint32</link> image_ID,
  1428.                                              <link linkend="GimpChannelType">GimpChannelType</link> component);</programlisting>
  1429. <para>
  1430. Returns if the specified image's image component is visible.
  1431. </para>
  1432. <para>
  1433. This procedure returns if the specified image's image component
  1434. (i.e. Red, Green, Blue intensity channels in an RGB image) is
  1435. visible or invisible -- whether or not it can be seen. If the
  1436. specified component is not valid for the image type, an error is
  1437. returned.</para>
  1438. <para>
  1439.  
  1440. </para><informaltable pgwide=1 frame="none" role="params">
  1441. <tgroup cols="2">
  1442. <colspec colwidth="2*">
  1443. <colspec colwidth="8*">
  1444. <tbody>
  1445. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1446. <entry> The image.
  1447. </entry></row>
  1448. <row><entry align="right"><parameter>component</parameter> :</entry>
  1449. <entry> The image component.
  1450. </entry></row>
  1451. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Component is visible.
  1452. </entry></row>
  1453. </tbody></tgroup></informaltable></refsect2>
  1454. <refsect2>
  1455. <title><anchor id="gimp-image-set-component-visible">gimp_image_set_component_visible ()</title>
  1456. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_component_visible
  1457.                                             (<link linkend="gint32">gint32</link> image_ID,
  1458.                                              <link linkend="GimpChannelType">GimpChannelType</link> component,
  1459.                                              <link linkend="gboolean">gboolean</link> visible);</programlisting>
  1460. <para>
  1461. Sets if the specified image's image component is visible.
  1462. </para>
  1463. <para>
  1464. This procedure sets if the specified image's image component (i.e.
  1465. Red, Green, Blue intensity channels in an RGB image) is visible or
  1466. invisible -- whether or not it can be seen. If the specified
  1467. component is not valid for the image type, an error is returned.</para>
  1468. <para>
  1469.  
  1470. </para><informaltable pgwide=1 frame="none" role="params">
  1471. <tgroup cols="2">
  1472. <colspec colwidth="2*">
  1473. <colspec colwidth="8*">
  1474. <tbody>
  1475. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1476. <entry> The image.
  1477. </entry></row>
  1478. <row><entry align="right"><parameter>component</parameter> :</entry>
  1479. <entry> The image component.
  1480. </entry></row>
  1481. <row><entry align="right"><parameter>visible</parameter> :</entry>
  1482. <entry> Component is visible.
  1483. </entry></row>
  1484. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1485. </entry></row>
  1486. </tbody></tgroup></informaltable></refsect2>
  1487. <refsect2>
  1488. <title><anchor id="gimp-image-get-filename">gimp_image_get_filename ()</title>
  1489. <programlisting><link linkend="gchar">gchar</link>*      gimp_image_get_filename         (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1490. <para>
  1491. Returns the specified image's filename.
  1492. </para>
  1493. <para>
  1494. This procedure returns the specified image's filename -- if it was
  1495. loaded or has since been saved. Otherwise, returns NULL.</para>
  1496. <para>
  1497.  
  1498. </para><informaltable pgwide=1 frame="none" role="params">
  1499. <tgroup cols="2">
  1500. <colspec colwidth="2*">
  1501. <colspec colwidth="8*">
  1502. <tbody>
  1503. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1504. <entry> The image.
  1505. </entry></row>
  1506. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The filename.
  1507. </entry></row>
  1508. </tbody></tgroup></informaltable></refsect2>
  1509. <refsect2>
  1510. <title><anchor id="gimp-image-set-filename">gimp_image_set_filename ()</title>
  1511. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_filename         (<link linkend="gint32">gint32</link> image_ID,
  1512.                                              <link linkend="gchar">gchar</link> *filename);</programlisting>
  1513. <para>
  1514. Sets the specified image's filename.
  1515. </para>
  1516. <para>
  1517. This procedure sets the specified image's filename.</para>
  1518. <para>
  1519.  
  1520. </para><informaltable pgwide=1 frame="none" role="params">
  1521. <tgroup cols="2">
  1522. <colspec colwidth="2*">
  1523. <colspec colwidth="8*">
  1524. <tbody>
  1525. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1526. <entry> The image.
  1527. </entry></row>
  1528. <row><entry align="right"><parameter>filename</parameter> :</entry>
  1529. <entry> The new image filename.
  1530. </entry></row>
  1531. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1532. </entry></row>
  1533. </tbody></tgroup></informaltable></refsect2>
  1534. <refsect2>
  1535. <title><anchor id="gimp-image-get-resolution">gimp_image_get_resolution ()</title>
  1536. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_get_resolution       (<link linkend="gint32">gint32</link> image_ID,
  1537.                                              <link linkend="gdouble">gdouble</link> *xresolution,
  1538.                                              <link linkend="gdouble">gdouble</link> *yresolution);</programlisting>
  1539. <para>
  1540. Returns the specified image's resolution.
  1541. </para>
  1542. <para>
  1543. This procedure returns the specified image's resolution in dots per
  1544. inch. This value is independent of any of the layers in this image.</para>
  1545. <para>
  1546.  
  1547. </para><informaltable pgwide=1 frame="none" role="params">
  1548. <tgroup cols="2">
  1549. <colspec colwidth="2*">
  1550. <colspec colwidth="8*">
  1551. <tbody>
  1552. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1553. <entry> The image.
  1554. </entry></row>
  1555. <row><entry align="right"><parameter>xresolution</parameter> :</entry>
  1556. <entry> The resolutionin the x-axis, in dots per inch.
  1557. </entry></row>
  1558. <row><entry align="right"><parameter>yresolution</parameter> :</entry>
  1559. <entry> The resolutionin the y-axis, in dots per inch.
  1560. </entry></row>
  1561. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1562. </entry></row>
  1563. </tbody></tgroup></informaltable></refsect2>
  1564. <refsect2>
  1565. <title><anchor id="gimp-image-set-resolution">gimp_image_set_resolution ()</title>
  1566. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_resolution       (<link linkend="gint32">gint32</link> image_ID,
  1567.                                              <link linkend="gdouble">gdouble</link> xresolution,
  1568.                                              <link linkend="gdouble">gdouble</link> yresolution);</programlisting>
  1569. <para>
  1570. Sets the specified image's resolution.
  1571. </para>
  1572. <para>
  1573. This procedure sets the specified image's resolution in dots per
  1574. inch. This value is independent of any of the layers in this image.
  1575. No scaling or resizing is performed.</para>
  1576. <para>
  1577.  
  1578. </para><informaltable pgwide=1 frame="none" role="params">
  1579. <tgroup cols="2">
  1580. <colspec colwidth="2*">
  1581. <colspec colwidth="8*">
  1582. <tbody>
  1583. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1584. <entry> The image.
  1585. </entry></row>
  1586. <row><entry align="right"><parameter>xresolution</parameter> :</entry>
  1587. <entry> The new image resolution in the x-axis, in dots per inch.
  1588. </entry></row>
  1589. <row><entry align="right"><parameter>yresolution</parameter> :</entry>
  1590. <entry> The new image resolution in the y-axis, in dots per inch.
  1591. </entry></row>
  1592. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1593. </entry></row>
  1594. </tbody></tgroup></informaltable></refsect2>
  1595. <refsect2>
  1596. <title><anchor id="gimp-image-get-unit">gimp_image_get_unit ()</title>
  1597. <programlisting><link linkend="GimpUnit">GimpUnit</link>    gimp_image_get_unit             (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  1598. <para>
  1599. Returns the specified image's unit.
  1600. </para>
  1601. <para>
  1602. This procedure returns the specified image's unit. This value is
  1603. independent of any of the layers in this image. See the gimp_unit_*
  1604. procedure definitions for the valid range of unit IDs and a
  1605. description of the unit system.</para>
  1606. <para>
  1607.  
  1608. </para><informaltable pgwide=1 frame="none" role="params">
  1609. <tgroup cols="2">
  1610. <colspec colwidth="2*">
  1611. <colspec colwidth="8*">
  1612. <tbody>
  1613. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1614. <entry> The image.
  1615. </entry></row>
  1616. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The unit.
  1617. </entry></row>
  1618. </tbody></tgroup></informaltable></refsect2>
  1619. <refsect2>
  1620. <title><anchor id="gimp-image-set-unit">gimp_image_set_unit ()</title>
  1621. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_unit             (<link linkend="gint32">gint32</link> image_ID,
  1622.                                              <link linkend="GimpUnit">GimpUnit</link> unit);</programlisting>
  1623. <para>
  1624. Sets the specified image's unit.
  1625. </para>
  1626. <para>
  1627. This procedure sets the specified image's unit. No scaling or
  1628. resizing is performed. This value is independent of any of the
  1629. layers in this image. See the gimp_unit_* procedure definitions for
  1630. the valid range of unit IDs and a description of the unit system.</para>
  1631. <para>
  1632.  
  1633. </para><informaltable pgwide=1 frame="none" role="params">
  1634. <tgroup cols="2">
  1635. <colspec colwidth="2*">
  1636. <colspec colwidth="8*">
  1637. <tbody>
  1638. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1639. <entry> The image.
  1640. </entry></row>
  1641. <row><entry align="right"><parameter>unit</parameter> :</entry>
  1642. <entry> The new image unit.
  1643. </entry></row>
  1644. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1645. </entry></row>
  1646. </tbody></tgroup></informaltable></refsect2>
  1647. <refsect2>
  1648. <title><anchor id="gimp-image-get-layer-by-tattoo">gimp_image_get_layer_by_tattoo ()</title>
  1649. <programlisting><link linkend="gint32">gint32</link>      gimp_image_get_layer_by_tattoo  (<link linkend="gint32">gint32</link> image_ID,
  1650.                                              <link linkend="gint">gint</link> tattoo);</programlisting>
  1651. <para>
  1652. Find a layer with a given tattoo in an image.
  1653. </para>
  1654. <para>
  1655. This procedure returns the layer with the given tattoo in the
  1656. specified image.</para>
  1657. <para>
  1658.  
  1659. </para><informaltable pgwide=1 frame="none" role="params">
  1660. <tgroup cols="2">
  1661. <colspec colwidth="2*">
  1662. <colspec colwidth="8*">
  1663. <tbody>
  1664. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1665. <entry> The image.
  1666. </entry></row>
  1667. <row><entry align="right"><parameter>tattoo</parameter> :</entry>
  1668. <entry> The tattoo of the layer to find.
  1669. </entry></row>
  1670. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The layer with the specified tattoo.
  1671. </entry></row>
  1672. </tbody></tgroup></informaltable></refsect2>
  1673. <refsect2>
  1674. <title><anchor id="gimp-image-get-channel-by-tattoo">gimp_image_get_channel_by_tattoo ()</title>
  1675. <programlisting><link linkend="gint32">gint32</link>      gimp_image_get_channel_by_tattoo
  1676.                                             (<link linkend="gint32">gint32</link> image_ID,
  1677.                                              <link linkend="gint">gint</link> tattoo);</programlisting>
  1678. <para>
  1679. Find a channel with a given tattoo in an image.
  1680. </para>
  1681. <para>
  1682. This procedure returns the channel with the given tattoo in the
  1683. specified image.</para>
  1684. <para>
  1685.  
  1686. </para><informaltable pgwide=1 frame="none" role="params">
  1687. <tgroup cols="2">
  1688. <colspec colwidth="2*">
  1689. <colspec colwidth="8*">
  1690. <tbody>
  1691. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1692. <entry> The image.
  1693. </entry></row>
  1694. <row><entry align="right"><parameter>tattoo</parameter> :</entry>
  1695. <entry> The tattoo of the channel to find.
  1696. </entry></row>
  1697. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The channel with the specified tattoo.
  1698. </entry></row>
  1699. </tbody></tgroup></informaltable></refsect2>
  1700. <refsect2>
  1701. <title><anchor id="gimp-image-get-cmap">gimp_image_get_cmap ()</title>
  1702. <programlisting><link linkend="guchar">guchar</link>*     gimp_image_get_cmap             (<link linkend="gint32">gint32</link> image_ID,
  1703.                                              <link linkend="gint">gint</link> *num_colors);</programlisting>
  1704. <para>
  1705. Returns the image's colormap
  1706. </para>
  1707. <para>
  1708. This procedure returns an actual pointer to the image's colormap, as
  1709. well as the number of colors contained in the colormap. If the image 
  1710. is not of base type INDEXED, this pointer will be NULL.</para>
  1711. <para>
  1712.  
  1713. </para><informaltable pgwide=1 frame="none" role="params">
  1714. <tgroup cols="2">
  1715. <colspec colwidth="2*">
  1716. <colspec colwidth="8*">
  1717. <tbody>
  1718. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1719. <entry> The image.
  1720. </entry></row>
  1721. <row><entry align="right"><parameter>num_colors</parameter> :</entry>
  1722. <entry> Number of colors in the colormap array.
  1723. </entry></row>
  1724. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The image's colormap.
  1725. </entry></row>
  1726. </tbody></tgroup></informaltable></refsect2>
  1727. <refsect2>
  1728. <title><anchor id="gimp-image-set-cmap">gimp_image_set_cmap ()</title>
  1729. <programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_cmap             (<link linkend="gint32">gint32</link> image_ID,
  1730.                                              <link linkend="guchar">guchar</link> *cmap,
  1731.                                              <link linkend="gint">gint</link> num_colors);</programlisting>
  1732. <para>
  1733. Sets the entries in the image's colormap.
  1734. </para>
  1735. <para>
  1736. This procedure sets the entries in the specified image's colormap.
  1737. The number of colors is specified by the \"num_colors\" parameter
  1738. and corresponds to the number of INT8 triples that must be contained
  1739. in the \"cmap\" array.</para>
  1740. <para>
  1741.  
  1742. </para><informaltable pgwide=1 frame="none" role="params">
  1743. <tgroup cols="2">
  1744. <colspec colwidth="2*">
  1745. <colspec colwidth="8*">
  1746. <tbody>
  1747. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1748. <entry> The image.
  1749. </entry></row>
  1750. <row><entry align="right"><parameter>cmap</parameter> :</entry>
  1751. <entry> The new colormap values.
  1752. </entry></row>
  1753. <row><entry align="right"><parameter>num_colors</parameter> :</entry>
  1754. <entry> Number of colors in the colormap array.
  1755. </entry></row>
  1756. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1757. </entry></row>
  1758. </tbody></tgroup></informaltable></refsect2>
  1759. <refsect2>
  1760. <title><anchor id="gimp-image-get-thumbnail-data">gimp_image_get_thumbnail_data ()</title>
  1761. <programlisting><link linkend="guchar">guchar</link>*     gimp_image_get_thumbnail_data   (<link linkend="gint32">gint32</link> image_ID,
  1762.                                              <link linkend="gint">gint</link> *width,
  1763.                                              <link linkend="gint">gint</link> *height,
  1764.                                              <link linkend="gint">gint</link> *bpp);</programlisting>
  1765. <para>
  1766.  
  1767. </para><informaltable pgwide=1 frame="none" role="params">
  1768. <tgroup cols="2">
  1769. <colspec colwidth="2*">
  1770. <colspec colwidth="8*">
  1771. <tbody>
  1772. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1773. <entry></entry></row>
  1774. <row><entry align="right"><parameter>width</parameter> :</entry>
  1775. <entry></entry></row>
  1776. <row><entry align="right"><parameter>height</parameter> :</entry>
  1777. <entry></entry></row>
  1778. <row><entry align="right"><parameter>bpp</parameter> :</entry>
  1779. <entry></entry></row>
  1780. </tbody></tgroup></informaltable></refsect2>
  1781. <refsect2>
  1782. <title><anchor id="gimp-image-convert-rgb">gimp_image_convert_rgb</title>
  1783. <programlisting>#define gimp_image_convert_rgb        gimp_convert_rgb
  1784. </programlisting>
  1785. <para>
  1786.  
  1787. </para></refsect2>
  1788. <refsect2>
  1789. <title><anchor id="gimp-image-convert-grayscale">gimp_image_convert_grayscale</title>
  1790. <programlisting>#define gimp_image_convert_grayscale  gimp_convert_grayscale
  1791. </programlisting>
  1792. <para>
  1793.  
  1794. </para></refsect2>
  1795. <refsect2>
  1796. <title><anchor id="gimp-image-convert-indexed">gimp_image_convert_indexed</title>
  1797. <programlisting>#define gimp_image_convert_indexed    gimp_convert_indexed
  1798. </programlisting>
  1799. <para>
  1800.  
  1801. </para></refsect2>
  1802. <refsect2>
  1803. <title><anchor id="gimp-image-duplicate">gimp_image_duplicate</title>
  1804. <programlisting>#define gimp_image_duplicate          gimp_channel_ops_duplicate
  1805. </programlisting>
  1806. <para>
  1807.  
  1808. </para></refsect2>
  1809.  
  1810. </refsect1>
  1811.  
  1812.  
  1813.  
  1814.  
  1815. </refentry>
  1816.